package com.clz.appdesign.myapp;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.view.MenuItem;

import com.blankj.utilcode.util.ToastUtils;
import com.clz.appdesign.appdependence.base.BaseActivity;
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author Administrator
 */
public class BottomNavigationActivity extends BaseActivity {


    @BindView(R.id.navigation_view)
    BottomNavigationViewEx mNavigationView;

    @Override
    public void initToolbar() {
        ButterKnife.bind(this);
    }

    @Override
    public void initView() {
        mNavigationView.enableAnimation(false);
        mNavigationView.enableShiftingMode(false);
        mNavigationView.enableItemShiftingMode(false);
    }

    @Override
    public void initData() {

    }

    @Override
    public void doBusiness(Context mContext) {
    mNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
        @Override
        public boolean onNavigationItemSelected(@NonNull MenuItem item) {
            ToastUtils.showShort(item.getTitle());

            return true;
        }
    });
    }

    @Override
    public int layoutResID() {
        return R.layout.activity_bottom_navigation;
    }

}
